<template>
	<view>
		<!-- <cu-custom bgColor="bg-gradual-red" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">文件数据编辑</block>
		</cu-custom> -->
		<web-view :src="uploadUrl" ></web-view>
	</view>
</template>

<script>
	import { mapState } from 'vuex';
	export default {
		computed:mapState(['userName','pwd','hasLogin','server']),
		data() {
			return {
			  	uploadUrl:''
			}
		},
		methods: {

		},
		onLoad(e) {
			if(!this.hasLogin){
				uni.redirectTo({
					url:'./login'
				});
				return;
			}
			
			var StatusBar=this.StatusBar;
			var CustomBar=this.CustomBar;
			var fileid=e.fileid;
			var userName=this.userName;
			var serverUrl=this.server.url;
			if(fileid){
				this.uploadUrl=serverUrl+"app/h5Upload?id="+fileid+"&userName="+userName+'&pwd='+this.pwd+'&StatusBar='+StatusBar+'&CustomBar='+CustomBar;
			}else{
				this.uploadUrl=serverUrl+"app/h5Upload?userName="+userName+'&pwd='+this.pwd+'&StatusBar='+StatusBar+'&CustomBar='+CustomBar;
			}
		}
	}
</script>

<style>

</style>
